package com.usian.service.impl;



import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.github.pagehelper.util.StringUtil;
import com.usian.mapper.NumberMapper;
import com.usian.pojo.Number;
import com.usian.service.NumberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;


import java.util.List;

@Service
public class NumberServiceImpl implements NumberService {
    @Autowired
    private NumberMapper numberMapper;


    @Override
    public PageInfo<Number> findAll(Integer page, Integer size, Number number) {
        PageInfo<Number> pageInfo = new PageInfo<>(numberMapper.findAll(number));
        return pageInfo;
    }

    @Override
    public void add(Number number) {
        numberMapper.insert(number);
    }

    @Override
    public void etid(Number number) {
        numberMapper.updateById(number);
    }

    @Override
    public void del(Integer id) {
        numberMapper.deleteById(id);
    }

    @Override
    public Number selectByName(String name) {
        return numberMapper.selectByName(name);
    }

}
